package com.zk.fm.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.zk.fm.R;

public class MainActivity extends Activity {

	private Button gameRelative;
	private Button footballNews;
	private Button about;
	private Button suggest;
	private Button bbs;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		initViews();
		setListener();
	}

	private void setListener() {
		gameRelative.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(MainActivity.this, GameRelativeActivity.class);
				startActivity(i);
			}
		});

		footballNews.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(MainActivity.this, LeaguesList.class);
				startActivity(i);
			}
		});

		about.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(MainActivity.this, AboutActivity.class);
				startActivity(i);
			}
		});

		suggest.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(MainActivity.this, SuggestActivity.class);
				startActivity(i);
			}
		});

		bbs.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(MainActivity.this, BBSActivity.class);
				startActivity(i);
			}
		});

	}

	private void initViews() {
		gameRelative = (Button) findViewById(R.id.gameRelative);
		footballNews = (Button) findViewById(R.id.footballNews);
		about = (Button) findViewById(R.id.about);
		suggest = (Button) findViewById(R.id.suggest);
		bbs = (Button) findViewById(R.id.bbs);
	}
}
